#ifndef _COLOR_H_
#define _COLOR_H_

#define GAMMA	2.2

class Color
{
public:
	Color(void);
	Color(double r, double g, double b);
	Color(Color* c);
	Color(int rgb);
	~Color(void);

	Color* set(double r, double g, double b);
	Color* set(Color c);
	Color* setRGB(int rgb);
	Color* setRGBE(int rgbe);
	double getLuminance();
	double getMin();
	double getMax();
	double getAverage();
	int toRGB();
	int toRGBE();
	Color* add(Color c);	
	Color* sub(Color c);
	Color* mul(Color c);
	Color* mul(double s);
	Color* div(Color c);

	static Color* add(Color c1, Color c2);
	static Color* add(Color c1, Color c2, Color* dest);
	static Color* sub(Color c1, Color c2);
	static Color* sub(Color c1, Color c2, Color* dest);
	static Color* mul(Color c1, Color c2);
	static Color* mul(Color c1, Color c2, Color* dest);
	static Color* mul(double s, Color c);
	static Color* mul(double s, Color c, Color* dest);
	static Color* div(Color c1, Color c2);
	static Color* div(Color c1, Color c2, Color* dest);


private:
	float		r;
	float		g;
	float		b;
};

#endif


